[/
  
]

[section:gmp_modular gmp_modular]

`#include <nil/crypto3/multiprecision/gmp.hpp>`
`#include <nil/crypto3/multiprecision/modular/modular_adaptor.hpp>`
`#include <nil/crypto3/multiprecision/modular/modular_params_gmp.hpp>`

    namespace boost {
    namespace multiprecision {
    typedef modular_params<gmp_int>           mpz_int_mod_params;
    typedef number<modular_adaptor<gmp_int> > mpz_int_mod;
    }
    } // namespace nil::crypto3::multiprecision

The `mpz_int_mod_params` and `mpz_int_mod`  acts as a thin wrapper around the [gmp] `mpz_t`
to provide a modular type that is a drop-in replacement for the native C++ integer types but with unlimited precision.

Things you should know when using this type:

* Default constructed `gmp_int` has the value zero (this is GMP's default behavior).
* Division by zero results in a `std::overflow_error` being thrown.
* Conversion from a string results in a `std::runtime_error` being thrown if the string can not be interpreted as a valid rational number.
* Arithmetic operations result in a `std::runtime_error` being thrown if the modulus values a different for two modular numbers. 
* No changes are made to the GMP library's global settings, so this type can coexist with existing GMP code.

[endsect] [/section:gmp_modular gmp_modular]
